package cn.bdqn.pn.service.commodity.CommodityServiceImpl;

import cn.bdqn.pn.pojo.commodity.Ticketinginfo;
import cn.bdqn.pn.reposity.commodity.TicketinginfoReposity;
import cn.bdqn.pn.service.commodity.TicketinginfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("TicketinginfoService")
public class TicketinginfoServiceImpl implements TicketinginfoService {
    @Autowired
    TicketinginfoReposity ticketinginfoReposity;
    @Override
    public boolean addTicketinginfo(Ticketinginfo ticketinginfo) {
        Ticketinginfo addTicketinginfo=ticketinginfoReposity.save(ticketinginfo);
        if (addTicketinginfo!=null){
            return true;
        }else{
            return false;
        }

    }

    @Override
    public Ticketinginfo getTicketinginfoByTicketInfoId(Integer ticketInfoId) {
        Ticketinginfo ticketinginfo=ticketinginfoReposity.getOne(ticketInfoId);
        return ticketinginfo;
    }
}
